
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'state.dart';

class GiftCardBindingLogic extends GetxController {
  final state = GiftCardBindingState();

  @override
  void onInit() {
    super.onInit();

    state.cardNumberController = TextEditingController();
    state.cardNumberFocusNode = FocusNode();

    state.passwordController = TextEditingController();
    state.passwordFocusNode = FocusNode();

    state.bindingBool = false;
  }

  void onBindingBoolClick() {
    if (state.cardNumberController.text != '' && state.passwordController.text != '') {
      state.bindingBool = true;
    } else {
      state.bindingBool = false;
    }
    update();
  }
}